package com.yh.correct.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.yh.correct.model.SysUser;

/**
 * 系统用户dao层接口
 * @author Administrator
 *
 */
public interface ISysUserMapper {
	/**
	 * 获取单个用户
	 * @param user
	 * @return
	 */
	SysUser getSysUser(SysUser user) throws Exception;
	/**
	 * 增加用户
	 * @param user
	 * @return
	 */
	int insertSysUser(SysUser user) throws Exception;
	/**
	 * 删除用户
	 * @param user
	 * @return
	 */
	int deleteSysUser(SysUser user) throws Exception;
	/**
	 * 更新用户
	 * @param user
	 * @return
	 */
	int updateSysUser(SysUser user) throws Exception;
	/**
	 * 修改用户密码
	 * @param id
	 * @param password
	 * @return
	 * @throws Exception
	 */
	int updateSysUserPwd(@Param("id")Integer id,@Param("password")String password) throws Exception;
	/**
	 * 模糊条件查询用户的列表
	 * @param condition  
	 * @return
	 */
	List<Object> findListByCondition(Map<String,Object> condition) throws Exception;
	/**
	 * 通过用户名称查找用户
	 * @param username
	 * @return
	 * @throws Exception
	 */
	SysUser findSysUserByName(String username) throws Exception;
}
